package com.fx.hystrix.controller;

import com.fx.demo.common.resulUtils.AjaxResult;
import com.fx.hystrix.feignclient.FeignProviderClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("myhystrix")
public class HystrixController {

    @Autowired
    private FeignProviderClient feignProviderClient;
    @GetMapping("findall")
    public AjaxResult findAll(){
        return feignProviderClient.findAll(0,10);
    }
    @GetMapping("getports")
    public String getports(){
        return feignProviderClient.getPort();
    }

}
